<template>
  <div>
    <!-- <el-button @click="doctorsAdvicv">按钮1</el-button> -->
    <pear-one
      :list="list"
      :count="count"
      @changeToWriteAdvice="doctorsAdvicv">
    </pear-one>
    <br>
    <pear-two></pear-two>
    <br>
    <pear-three></pear-three>
    <notification
      content="test notify"
      @close="close"/>
      <el-button @click="getNum">按钮x</el-button>
  </div>
</template>

<script>
import pearOne from './pearOne.vue'
import pearTwo from './pearTwo.vue'
import pearThree from './pearThree.vue'
import {
  report // 获取病区列表
} from '@/api/fruits.js'
export default {
  name: 'pear',
  components: {
    pearOne,
    pearTwo,
    pearThree
  },
  data () {
    return {
      list: '我是头部', // 父传子
      count: 1
    }
  },
  mounted () {
  },
  computed: {
  },
  methods: {
    doctorsAdvicv (res) {
      console.log(res) // 子传父
      console.log(this.count)
    },
    close () {
      console.log`close`
    },
    async getNum () {
      let obj = {}
      obj.channelname = 'public_tuijian_spring'
      let res = await report(obj)
      if (res.data.code === 200) {
        console.log(res)
      }
    }
  }
}
</script>
